/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package com.dianning.service;

import java.util.List;

import com.dianning.bean.Channel;
import com.dianning.bean.ChannelContact;
import com.dianning.bean.Visitor;
import com.dianning.exception.DianningException;

/**
 * 功能描述: 频道操作接口
 *
 * 创建日期 Apr 10, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public interface ChannelService {

	/**
	 * 根据主键ID获取Channel对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel findChannelById(long id);
	/**
	 * 保存Channel对象
	 * 
	 * @param channel
	 * 			Channel对象
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel updateChannel(Channel channel);
	
	/**
	 * 根据主键ID获取ChannelContact对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return ChannelContact
	 * 			ChannelContact对象
	 */
	public ChannelContact findChannelContactById(long id);
	
	/**
	 * 根据ccid 获取Channel对象
	 * 
	 * @param ccid
	 * 			long
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel findChannelByCcid(long ccid);
	
	/**
	 * 获取ChannelContact对象列表
	 * @param parentId
	 * @param depth
	 * @param orderby
	 * @param ascOrDesc
	 * @return List
	 */
	public List findChannelContacts(long parentId,int depth,String orderby, int ascOrDesc);
	
	/**
	 * 获取Channel列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Area对象列表
	 */
	public List findChannels(String orderby, int ascOrDesc);
	
	public Channel findChannelByCode(String code);
	
}
